!function(){"use strict";const e="show",t="collapsing",n="collapse";function o(e){return e.offsetHeight}function i(e,t,n){if(!n)return void e();const o=function(e){if(!e)return 0;let{transitionDuration:t,transitionDelay:n}=window.getComputedStyle(e);const o=Number.parseFloat(t),i=Number.parseFloat(n);if(!o&&!i)return 0;return t=t.split(",")[0],n=n.split(",")[0],1e3*(Number.parseFloat(t)+Number.parseFloat(n))}(t);t.addEventListener("transitionend",(function n(o){o.target===t&&(t.removeEventListener("transitionend",n),e())})),setTimeout((()=>{t.dispatchEvent(new Event("transitionend"))}),o)}const s=function(t,n){n.classList.contains(e)?a(t,n):c(t,n)},c=function(s,c){if(c.classList.contains(t)||c.classList.contains(e))return;c.classList.remove(n),c.classList.add(t),s.classList.add(e);o(c),c.style.height=`${c.scrollHeight}px`,i((()=>{c.classList.remove(t),c.classList.add(n),c.classList.add(e)}),c,!0)},a=function(s,c){if(c.classList.contains(t)||!c.classList.contains(e))return;c.style.height=`${c.getBoundingClientRect().height}px`,o(c),c.classList.add(t),c.classList.remove(e),c.classList.remove(n),s.classList.remove(e);i((()=>{c.classList.remove(t),c.classList.add(n)}),c,!0),c.style.height=""};!function(){const e=document.querySelector(".govcy-global-chat"),t=document.querySelector(".govcy-header-chat-area");e&&e.addEventListener("click",(n=>{n.preventDefault(),s(e,t)}))}(),function(){const e=document.getElementById("govcy-exp-chatbot-btn");e&&e.addEventListener("click",(function(){const e=document.getElementById("govcy-portal-front-chatbot"),t=document.querySelector(".govcy-search-section");e&&t&&(e.classList.toggle("govcy-col-6"),e.classList.toggle("govcy-col-12"),e.classList.add("govcy-transitioning"),t.classList.contains("govcy-d-none")?setTimeout((()=>{t.classList.toggle("govcy-d-none"),e.classList.remove("govcy-transitioning")}),300):t.classList.toggle("govcy-d-none"))}))}();const r={initFiltersAutoSubmit:()=>{const e=document.querySelectorAll(".govcy-select"),t=document.getElementById("govcy_filter_form");e.forEach((e=>{e.addEventListener("change",(()=>t.submit()))}))},initWPDatePicker:()=>{document.querySelectorAll(".wpforms-datepicker-wrap").forEach((e=>{if(e.classList.remove("wpforms-datepicker-wrap"),e.classList.add("govcy-date-picker"),"undefined"!=typeof GOVCY&&(new GOVCY.DatePicker(e),void 0!==jQuery.fn.validate)){jQuery.validator.addMethod("greekdateformat",(function(e,t,n){var o=e.match(/^\d{2}\/\d{2}\/\d{4}$/);if(o){var i=e.split("/"),s=`${i[2]}/${i[1]}/${i[0]}`,c=new Date(s);o=!isNaN(c)}return o}),wpforms_settings.val_date);var t=jQuery(e).find("input:visible");t&&1==t.length&&setTimeout((function(){t.rules("add",{greekdateformat:!0},0)}))}}))},initLightBox:()=>{"undefined"!=typeof GLightbox&&new GLightbox({touchNavigation:!1,zoomable:!1,draggable:!1,width:"100%",descPosition:"right",selector:".govcy-lightbox"})},initPostSwiper:()=>{document.querySelector(".swiper")&&"undefined"!=typeof Swiper&&new Swiper(".govcy-swiper-post",{slidesPerView:1,spaceBetween:30,navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},pagination:{el:".swiper-pagination",clickable:!0}})},initScrollClassToggle:()=>{const e=document.querySelector(".govcy-cms-sticky-header");e&&window.addEventListener("scroll",(()=>{(window.scrollY||document.documentElement.scrollTop)>0?e.classList.add("govcy-br-bottom-1","govcy-br-bottom-standard"):e.classList.remove("govcy-br-bottom-1","govcy-br-bottom-standard")}))},initGlobalSearchFiltering:()=>{document.querySelectorAll(".govcy-filter-form-target").forEach((function(e){e.querySelectorAll(".govcy-filter-text-target").forEach((function(e){e.addEventListener("input",(function(){const t=e.value.toLowerCase();e.closest(".govcy-fieldset").querySelectorAll('input[type="checkbox"]').forEach((function(e){e.nextElementSibling.textContent.toLowerCase().includes(t)?e.closest(".govcy-checkbox").style.display="":e.closest(".govcy-checkbox").style.display="none"}))}))}))}))},init:()=>{r.initFiltersAutoSubmit(),r.initLightBox(),r.initPostSwiper(),r.initScrollClassToggle(),r.initGlobalSearchFiltering()}};window.addEventListener("DOMContentLoaded",(()=>r.init()));const d={setCookie:(e,t)=>{const n=new Date;n.setTime(n.getTime()+31536e6);let o="expires="+n.toUTCString();document.cookie=e+"="+t+";"+o+";path=/"},getCookie:e=>{let t=e+"=",n=decodeURIComponent(document.cookie).split(";");for(let e=0;efetch(window.location.origin+"/wp-json/cookie/strings/"+e).then((e=>e.json())).then((e=>e)),initCookieConsentForm:()=>{const e=document.querySelector('[data-consent-form="true"]');if(!e)return;let t=d.getCookie("govcy_cpm"),n=d.getCookie("govcy_cpw");const o=e.querySelectorAll(".wpforms-marketing input"),i=e.querySelectorAll(".wpforms-website input");""==t&&(t=0),""==n&&(n=0),o.forEach((e=>{e.checked=e.value==t})),i.forEach((e=>{e.checked=e.value==n}))},initCookieConsentBanner:async()=>{const e=d.getCookie("govcy_cpm"),t=d.getCookie("govcy_cpw");if(["0","1"].includes(e)&&["0","1"].includes(t))return;const n=d.getCookie("wp-wpml_current_language"),o=document.getElementById("cookieConsentWrapper"),i=await d.getCookieConsentStrings(n),s=i.title,c=i.text1,a=i.text2,r=i.buttons.btnAcceptText,l=i.buttons.btnRejectText,u=i.buttons.btnRedirectText,g=document.createElement("div"),p=document.createElement("div"),m=document.createElement("h3"),v=document.createElement("p"),y=document.createElement("p"),f=document.createElement("div"),h=document.createElement("a"),b=document.createElement("a"),L=document.createElement("a");g.classList.add("govcy-cookie-consent-banner"),p.classList.add("govcy-container"),f.classList.add("govcy-d-flex","govcy-align-items-center"),m.insertAdjacentHTML("beforeend",s),v.insertAdjacentHTML("beforeend",c),y.insertAdjacentHTML("beforeend",a),h.appendChild(document.createTextNode(r)),h.setAttribute("href","#"),h.setAttribute("id","btnAcceptAllCookies"),h.classList.add("govcy-btn-primary","me-2"),b.appendChild(document.createTextNode(l)),b.setAttribute("href","#"),b.setAttribute("id","btnRejectAllCookies"),b.classList.add("govcy-btn-primary","me-2"),L.appendChild(document.createTextNode(u)),L.setAttribute("href",o.dataset.formUrl),g.appendChild(p),f.appendChild(h),f.appendChild(b),f.appendChild(L),g.appendChild(p),p.appendChild(m),p.appendChild(v),p.appendChild(y),p.appendChild(f),h.addEventListener("click",(e=>{e.preventDefault(),d.setCookie("govcy_cpm",1),d.setCookie("govcy_cpw",1),"undefined"!=typeof _paq&&_paq&&_paq.push(["rememberConsentGiven"]),g.classList.add("govcy-d-none")})),b.addEventListener("click",(e=>{e.preventDefault(),d.setCookie("govcy_cpm",0),d.setCookie("govcy_cpw",0),"undefined"!=typeof _paq&&_paq&&_paq.push(["forgetConsentGiven"]),g.classList.add("govcy-d-none")})),o.appendChild(g)},init:()=>{d.initCookieConsentForm(),d.initCookieConsentBanner()}};window.addEventListener("DOMContentLoaded",(()=>d.init()));const l={init:()=>{const e=document.getElementById("govcyha-question");if(!e)return;[...e.getElementsByTagName("a")].forEach((t=>{t.addEventListener("click",(function(t){t.preventDefault();const n=e.dataset.id,o=e.dataset.nonce,i=parseInt(this.dataset.value);l.submitAnswer({id:n,nonce:o,value:i}).then((()=>{})),setTimeout((function(){const e=document.getElementById("govcy-helpful-question"),t=document.getElementById("govcy-helpful-thank-you");e&&t&&(e.style.display="none",t.style.display="block")}),20)}))}))},submitAnswer:async(e={})=>(await fetch("/wp-json/ha/v1/article",{method:"POST",mode:"cors",cache:"no-cache",credentials:"same-origin",headers:{"Content-Type":"application/json"},redirect:"follow",referrerPolicy:"no-referrer",body:JSON.stringify(e)})).json()};window.addEventListener("DOMContentLoaded",(()=>l.init()))}();